#include <iostream>
#include "factory.h"

int main(int argv, char**argc)
{
    printf("************  test hello zc!!!   **************\n");
    /* add test code! */
    shared_ptr<NetworkDevice> nd1,nd2,nd3,nd4,nd5;
	shared_ptr<DeviceFactory> df = make_shared<DeviceFactory>();
	
	nd1 = df->getNetworkDevice("cisco"); 
	nd1->use();
	
	nd2 = df->getNetworkDevice("cisco"); 
	nd2->use();
	
	nd3 = df->getNetworkDevice("cisco"); 
	nd3->use();
	
	nd4 = df->getNetworkDevice("tp"); 
	nd4->use();	
	
	nd5 = df->getNetworkDevice("tp"); 
	nd5->use();
	
	cout << "Total Device: " << df->getTotalDevice() << endl;
	cout << "Total terminal: " << df->getTotalTerminal() << endl;

    return 0;
}